home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / sos3-2.lha / include / trc.h < prev   
C/C++ Source or Header  |  1992-01-23  |  3KB  |  120 lines

  1. /* --------------------------------------------------------------------------
  2.  * Copyright 1992 by Forschungszentrum Informatik (FZI)
  3.  *
  4.  * You can use and distribute this software under the terms of the licence
  5.  * you should have received along with this program.
  6.  * If not or if you want additional information, write to
  7.  * Forschungszentrum Informatik, "STONE", Haid-und-Neu-Strasse 10-14,
  8.  * D-7500 Karlsruhe 1, Germany.
  9.  * --------------------------------------------------------------------------
  10.  */
  11. /* **************************** */
  12. /* ** tt-Modul Schnittstelle ** */
  13. /* **************************** */
  14.  
  15. #ifndef    TRCH
  16. #define    TRCH
  17.  
  18. typedef          int T_addrformat;
  19. #define          T_DEC  ( T_addrformat ) 1
  20. #define          T_UNS  ( T_addrformat ) 2
  21. #define          T_OCT  ( T_addrformat ) 3
  22. #define          T_HEX  ( T_addrformat ) 4
  23.  
  24. #ifdef NO_TT
  25.  
  26. #define TT(l,c)
  27. #define TTN(l,c)
  28. #define T_PROC(n)
  29. #define T_ENTER
  30. #define T_LEAVE
  31. #define T_INIT(name)
  32. #define T_REDEF(spec)
  33. #define T_EXIT()
  34.  
  35. #else
  36.  
  37. extern     unsigned char tt_active[];
  38.  
  39. extern     T_addrformat    tt_addrformat;
  40.  
  41. #if defined(__cplusplus) || defined(c_plusplus)
  42. extern "C" 
  43. {  char    *tt_calloc (char*, const int), 
  44.     *tt_alloc (char*, const int);
  45.    void tt_free  (char*, char*),
  46.     tt_init  (const char* const),
  47.     tt_redef (const char* const),
  48.     tt_exit (),
  49.     tt_enter (const char* const),
  50.     tt_leave (const char* const),
  51.     tt_nl (),
  52.     tt_txt   (const char* const),
  53.     tt_i     (const char* const, const int),
  54.     tt_u     (const char* const, const unsigned),
  55.     tt_o     (const char* const, const unsigned),
  56.     tt_x     (const char* const, const unsigned),
  57.     tt_li    (const char* const, const long),
  58.     tt_lo    (const char* const, const long),
  59.     tt_lx    (const char* const, const long),
  60.     tt_c     (const char* const, const int),
  61.     tt_s     (const char* const, const char*),
  62.     tt_a     (const char* const, const char* const, const int),
  63.     tt_sa    (const char* const, const char** const, const int),
  64.     tt_p     (const char* const, const void* const);
  65. }
  66. #else
  67. extern char *tt_calloc (), 
  68.         *tt_alloc ();
  69. extern void tt_free (),
  70.         tt_init (),
  71.         tt_redef (),
  72.         tt_exit (),
  73.         tt_enter (),
  74.         tt_leave (),
  75.         tt_nl (),
  76.         tt_i (),
  77.         tt_u (),
  78.         tt_x (),
  79.         tt_li (),
  80.         tt_lo (),
  81.         tt_lx (),
  82.         tt_c (),
  83.         tt_s (),
  84.         tt_a (),
  85.         tt_sa (),
  86.         tt_p (),
  87.         tt_txt ();
  88. #endif defined(...)
  89.  
  90. #define    T_PROC(n)    char *tt_proc = (n);
  91. #define    T_INIT(name)    tt_init ( name );
  92. #define T_REDEF(spec)    tt_redef ( spec );
  93. #define T_EXIT()    tt_exit ();
  94.  
  95. #define TT(l,c)         if(tt_active[l]){c;tt_nl();}
  96. #define TTN(l,c)        if(tt_active[l]){c;}
  97.  
  98. #define T_ENTER        tt_enter ( tt_proc );
  99. #define T_LEAVE        tt_leave ( tt_proc );
  100.  
  101. #define    TB(b)    tt_txt ((b) ? "b: TRUE" : "b: FALSE")
  102. #define TXT(xt) tt_txt ( xt )
  103. #define    TI(i)    tt_i ( "i:", i )
  104. #define TU(u)    tt_u ( "u:", u )
  105. #define    TO(o)    tt_o ( "o:", o )
  106. #define    TX(x)    tt_x ( "x:", x )
  107. #define    TLI(li)    tt_li ( "li:", li )
  108. #define    TLO(lo)    tt_lo ( "lo:", lo )
  109. #define    TLX(lx)    tt_lx ( "lx:", lx )
  110. #define TC(c)    tt_c ( "c:", c )
  111. #define TS(s)    tt_s ( "s:", s )
  112. #define TA(a,n) tt_a ( "a:", a, n )
  113. #define TSA(a,n) tt_sa ( "a:", a, n )
  114. #define TP(p)    tt_p ( "p:", p )
  115. #define TsS(sS) {char *_x=(sS).make_Cstring(); tt_s("sS:",_x); delete _x;}
  116. #define TOBJ(o) {tt_i("o.c:", (int)o.container()); tt_i("o.o:", (int)o.offset());}
  117.  
  118. #endif NO_TT
  119. #endif TRCH
  120.